package com.itheima.Tesk;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class ta {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress I = InetAddress.getByName("LAPTOP-FQOOENTJ");
        String hostName = I.getHostName();
        System.out.println(hostName);
        String hostAddress = I.getHostAddress();
        System.out.println(hostAddress);
    }
}
